import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import ElementPlus from 'element-plus'
import * as ElementPlusIconsVue  from 'element-plus'
import 'element-plus/dist/index.css'
import router from './router/index'
import { createPinia } from 'pinia'
import dayjs from "dayjs"

let app = createApp(App)
const pinia = createPinia();


import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
// import piniaPlugin from 'pinia-plugin-persistedstate'
pinia.use(piniaPluginPersistedstate);
// pinia.use(piniaPlugin)
app.use(router)
app.use(ElementPlus)
app.use(pinia)
app.config.globalProperties.$dayjs = dayjs
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}
app.mount('#app')
